import request from '@/utils/request';

export async function queryYearRule(storeId, params) {
  return request(`store/statistics/year/${storeId}`, {
    params,
  });
}
export async function queryRecharge(params) {
  return request(`store/statistics/all/recharge/dashboardCount`, {
    params,
  });
}
export async function queryConsumption(params) {
  return request(`store/statistics/all/consume/dashboard`, {
    params,
  });
}
export async function queryGoodsOverdue(params) {
  return request(`goods/goods/expireDateWaring`, {
    params
  })
}
export async function queryStockWorking(params) {
  return request(`goods/goods/stockWaring`, {
    params
  })
}
export async function chartsService(time, date, params) {
  return request(time === 'week' ? `/store/charts/${time}` : `/store/charts/${time}/${date}`, {
    params
  })
}
